<template>
    <div>
        我是c组件
        <input type="text">
    </div>
</template>

<script>
export default {
    beforeCreate(){
        console.log("beforecreated");
    },
    created() {
        console.log("create");
    },
    beforeMount(){
        console.log("beforemountd");
    },
    mounted(){
        console.log("mountd")
    },
    beforeDestroy(){
        console.log("beforeDestroy");
    },
    destroyed(){
        console.log("destoryed")
    },
    activated() {  // 这个生命周期只有被keep-alive包裹住才有
        console.log("activated");
    },
    deactivated(){ // 组件失活
        console.log("deactivated");
    }
}
</script>

<style>

</style>